using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace TinyLogger
{
    /// <summary>
    /// Logger to write to file in current directory of application
    /// </summary>
    public class FileLogger : ILoggerSink
    {
        private string filePath;

        public FileLogger(string fileName)
        {
            this.filePath = Path.Combine(System.Environment.CurrentDirectory, fileName);
        }

        public void AddLog(LogLevel level, string logString)
        {
            File.AppendAllText(this.filePath, level.ToString() + "\t" + logString + System.Environment.NewLine);
        }

    }
}
